package com.example.generic;

import com.google.common.collect.Lists;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.List;

/**
 * XXXXXXXXX
 *
 * @author brad zhang
 * @version 2.0
 * @date 2021/9/7 9:41
 */
public abstract class BaseBeanExcelListener<M1 extends BaseModel> extends BaseExcelListener<M1> {

    public List<List<String>> getHeads() {
        try {
            ParameterizedType genericSuperclass = (ParameterizedType)getClass().getGenericSuperclass();
            Type actualTypeArgument = genericSuperclass.getActualTypeArguments()[0];
            String typeName = actualTypeArgument.getTypeName();
            Class<?> aClass = Class.forName(typeName);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return Lists.newArrayList();
    }
}
